package com.base.pig.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.base.pig.annotation.DictReplace;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import lombok.Data;

import java.sql.Timestamp;

/**
 * @ProjectName
 * @Package com.pig4cloud.pig.lab.entity
 * @ClassName ScAlarmManager
 * @Description 资源管理表 存储15天之内的数据,包括当天
 * @Company lab
 * @Author wangw
 * @Date 2020/4/22 0022 15:45
 * @UpdateUser
 * @UpdateDate
 * @UpdateRemark
 * @Version 1.0.0
 */
@Data
@JsonInclude
@TableName(value = "sc_alarm_manager")
public class ScAlarmManager {

  private static final long serialVersionUID = 1L;

  /**
   * @Title 主键ID
   * @Description
   * @return
   * @author wangw
   * @date
  */
  @TableId(type = IdType.ASSIGN_ID)
  @JsonSerialize(using= ToStringSerializer.class)
  private Long id;

  /**
   * @Title
   * @Description 设备编号
   * @return
   * @author wangw
   * @date
  */
  private String sn;

  /**
   * @Title
   * @Description 设备类型
   * @return
   * @author wangw
   * @date
   */
  private String  deviceType;

  /**
   * @Title
   * @Description 设备类型名称
   * @return
   * @author wangw
   * @date
   */
  @TableField(exist = false)
  @DictReplace(valueField="deviceType",type = "device_type")
  private String  deviceTypeName;

  /**
   * @Title
   * @Description 街道名称
   * @return
   * @author wangw
   * @date
   */
  private String roadName;

  /**
   * @Title
   * @Description 位置
   * @return
   * @author wangw
   * @date
   */
  private String location;

  /**
   * @Title
   * @Description 报警时间
   * @return
   * @author wangw
   * @date
   */
  private Timestamp alarmTime;

  /**
   * @Title
   * @Description 报警消息
   * @return
   * @author wangw
   * @date
   */
  private String  alarmMsg;

  /**
   * @Title
   * @Description 设备状态
   * @return
   * @author wangw
   * @date
   */
  private Integer deviceStatus;

  /**
   * @Title
   * @Description 权属单位关联ID
   * @return
   * @author wangw
   * @date
   */
  private Long authorizedUnitNumber;

  /**
   * @Title
   * @Description 权属单位名称
   * @return
   * @author wangw
   * @date
   */
  private String authorizedUnitName;

  /**
   * @Title
   * @Description 责任人
   * @return
   * @author wangw
   * @date
   */
  private String principal;

  /**
   * @Title
   * @Description 责任人
   * @return
   * @author wangw
   * @date
   */
  private String principalId;

  /**
   * 工单编号
   */
  private String orderCode;

  /**
   * 厂商代码
   */
  private Long manufacturerNumber;

  /**
   * 厂商名称
   */
  private String manufacturerName;

  /**
   * @Title
   * @Description 创建时间
   * @return
   * @author wangw
   * @date
   */
  private Timestamp gmtCreate;

  /**
   * @Title
   * @Description 更新时间
   * @return
   * @author wangw
   * @date
   */
  private Timestamp gmtModified;

  @TableField(exist = false)
  private Double longitude;
  @TableField(exist = false)
  private Double latitude;

}
